<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>用户管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		 
		});
		function page(n,s){
			if(n) $("#pageNo").val(n);
			if(s) $("#pageSize").val(s);
			$("#searchForm").attr("action","${ctx}/zabbix/api/history.view");
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
</head>
<body>
	 
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/zabbix/api/history.view">历史记录</a></li>
	</ul>
	<form  id="searchForm" action="${ctx}/zabbix/api/history.view" method="post" class="breadcrumb form-search ">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<input  name="type" type="hidden" value="${type}"/>
		<input  name="hostName" type="hidden" value="${hostName}"/>
		<ul class="ul-form">
			 
			<li><label>机器名称：</label>${hostName}</li>
			<li> </li>
			<li><label>性能指标：</label>
				 <select name="key" class="input-large">
				 		<c:forEach items="${keys}" var="dict">
				 			<option value='${dict.value}'  <c:if test="${map.key==dict.value}"> selected</c:if> >${dict.label}</option>
				 		</c:forEach>
				 		
				 </select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>
			<li class="clearfix"></li>
		</ul>
	</form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr><th>主机名称</th><th>性能指标</th><th>指标值</th><th>时间</th></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="map">
			<tr>
				<td>${hostName}</td>
				<td>${keyLabel}</td>
				<td>${map.value}</td>
				<td><fmt:formatDate value="${map.clock}" type="both"/></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>